package com.ssy.lingxi.platform.template.service.repository;

import com.ssy.lingxi.platform.template.service.entity.collect.MemberLogisticsCollect;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;


@Repository
public interface MemberLogisticsCollectRepository extends JpaRepository<MemberLogisticsCollect, Long> {

    void deleteByLogisticsIdAndMemberIdAndUserId(Long logisticsId, Long memberId, Long userId);

    Page<MemberLogisticsCollect> findAllByMemberIdAndUserId(Long memberId, Long userId, Pageable page);

    Boolean existsByLogisticsIdAndMemberIdAndUserId(Long logisticsId, Long memberId, Long userId);
}
